package com.aube.mis.controller;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.aube.mis.service.CommonService;
import com.aube.vo.upload.UploadOSSVo;

@Controller
@RequestMapping("/commons")
public class CommonController extends AbstractController {
	@Resource
	private CommonService commonService;

	@RequestMapping(value = "/oss/policy.ajax", produces = "text/plain;charset=UTF-8")
	@ResponseBody
	public String ossPolicy(String showId, String filename, String fileTag) {
		UploadOSSVo result = commonService.uploadPicPolicy(showId, filename, fileTag);
		Map<String, Object> dataMap = new HashMap<String, Object>();
		dataMap.put("result", result);
		return this.createSuccessResponse(dataMap);
	}
}
